package org.spring.springlogger.facade;

//门面模式
public class FacadeLight {

    private BedroomLight bedroomLight;
    private BathroomLight bathroomLight;
    private LivingroomLight livingroomLight;

    public FacadeLight() {
        this.bedroomLight = new BedroomLight();
        this.bathroomLight = new BathroomLight();
        this.livingroomLight = new LivingroomLight();
    }

    public void LightOn(){
        bathroomLight.on();
        bedroomLight.on();
        livingroomLight.on();

    }
    public void LightOff(){
        bathroomLight.off();
        bedroomLight.off();
        livingroomLight.off();

    }
}
